package com.zr.inquiry.mapper;

import com.zr.inquiry.model.InquiryTotal;
import com.zr.inquiry.model.SelectMaterial;
import com.zr.inquiry.model.Spare;
import com.zr.inquiry.model.Supplier;
import com.zr.inquiry.model.vo.*;
import com.zr.legalperson.model.LegalPerson;
import com.zr.util.ResultVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import javax.validation.Valid;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * Created by Administrator on 2019/1/7.
 */
@Mapper
public interface InquiryMapper {
    List<Supplier> getSupplierName(Integer legalPersonId);

    int queryCount(SelectMaterialVo selectMaterialVo);
    List<SelectMaterial> queryPage(SelectMaterialVo selectMaterialVo);
    int querySupplierCount(SupplierSelectVo supplierSelectVo);
    List<Supplier> querySupplierPage(SupplierSelectVo supplierSelectVo);
    int insertInquiryTotal(InquiryTotal inquiryTotal);


    List<String> querySupplierByDetailsCodeList(List<String> inquiryDetailsCodeList);

    List<String> querySpareBySupplierCode(List<String> supplierDetailsCodeList);

    int insertInquirySpareDetials(List<Spare> spares);

    int insertInquirySupplierDetails(List<Supplier> supplierList);

    int queryInquiryCount(InquiryListSelectVo inquiryListSelectVo);

    List<InquiryListSelectResultVo> queryInquiryPage(InquiryListSelectVo inquiryListSelectVo);

    InquirySeeVo inquirySheetSee(String requestForQuotationId);

    List<InquirySpareVo> queryInquirySpareDetails(String requestForQuotationId);

    List<InquirySupplierVo> queryInquirySupplierDetails(String requestForQuotationId);

    InquiryTotal queryInquiryByRfqid(@Param("requestForQuotationId") String requestForQuotationId);

    List<String> querySpareBySpareCoding(List<String> clientSpareCode);

    List<String> querySupplierBySupplierCoding(List<String> clientSupplierCode);

    void updateInquiryTotal(InquiryTotal inquiryTotal);

    void deleteInquirySpare(@NotNull(message = "订单号不能为空！") String requestForQuotationId);

    void deleteInquirySupplier(@NotNull(message = "订单号不能为空！") String requestForQuotationId);

    void updateStatusShenhe(InquiryTotal inquiryTotal);

    void updateStatusShenheToSave(InquiryTotal inquiryTotal);
}
